﻿<%@ Page Language="VB" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace='Microsoft.Reporting.WebForms' %>
<%@ Import Namespace='System.Collections.Generic' %>

<script runat="server">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Try
            Dim parameters = New List(Of ReportParameter)()

            Dim pMenu = New ReportParameter("str_log_menu", Request.QueryString("str_log_menu"))
            pMenu.Name = "str_log_menu"
            parameters.Add(pMenu)

            Dim pType = New ReportParameter("str_log_type", Request.QueryString("str_log_type"))
            pType.Name = "str_log_type"
            parameters.Add(pType)
        
            Dim pDate = New ReportParameter("str_create_datetime", Request.QueryString("str_create_datetime"))
            pDate.Name = "str_create_datetime"
            parameters.Add(pDate)

            ReportViewer1.LocalReport.SetParameters(parameters)
        Catch ex As Exception
            GenericHelper.ShowAlert(Me, ex)
        End Try

    End Sub
    
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
            Height="500px" Width="100%">
            <LocalReport ReportPath="Reports\report_log_system.rdlc">
                <DataSources>
                    <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="log_system_USP_List_log_system" />
                </DataSources>
            </LocalReport>
        </rsweb:ReportViewer>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
            SelectMethod="GetData" TypeName="log_systemTableAdapters.USP_List_log_systemTableAdapter">
            <SelectParameters>
                <asp:QueryStringParameter DefaultValue="0" Name="log_menu" QueryStringField="log_menu"
                    Type="Int32" />
                <asp:QueryStringParameter DefaultValue="0" Name="log_type" QueryStringField="log_type"
                    Type="String" />
                <asp:QueryStringParameter DefaultValue="0" Name="create_datetime" QueryStringField="create_datetime"
                    Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    </form>
</body>
</html>
